package org.alfresco.custom.repo.web.scripts.workflow;


import java.util.Map;

import org.alfresco.repo.web.scripts.workflow.TaskInstancesGet;
import org.alfresco.repo.web.scripts.workflow.WorkflowModelBuilder;
import org.springframework.extensions.webscripts.Cache;
import org.springframework.extensions.webscripts.Status;
import org.springframework.extensions.webscripts.WebScriptRequest;

/**
 * 
 * @author Rui Fernandes
 *
 */
public class SecuredTaskInstancesGet extends TaskInstancesGet {

	
	@Override
    protected Map<String, Object> buildModel(WorkflowModelBuilder modelBuilder, WebScriptRequest req, Status status, Cache cache)
    {
		WorkflowWebscriptAuthorityCheck.assertUserAdminOrProperAuthority(authenticationService,authorityService,req);
		return super.buildModel(modelBuilder,req,status,cache);
		
    }
}
